package hadoop;

import java.net.URI;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class Test {
	public static void main(String[] args) {
		try {
			Configuration conf = new Configuration();
			URI uri = new URI("hdfs://192.168.192.128:9000");
			FileSystem fs = FileSystem.get(uri, conf, "root");
			fs.create(new Path("/test.txt"));
			fs.close();
			System.out.println("ok");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
